The past perfect tense represents action that occurs before another past action.
British Dictionary definitions for past perfect
past perfect
adjective
1.
denoting a tense of verbs used in relating past events where the action had already occurred at the time of the action of a main verb that is itself in a past tense. In English this is a compound tense formed with had plus the past participle